package testing.seperator;


import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import seperator.AWLSeperator;
import words.AWL;

public class AWLSeperatorTest {
	AWLSeperator seperator;
	AWL awl;
	
	@Before
	public void setUp() throws Exception {
		this.seperator = new AWLSeperator();
		
	}
	
	@Test
	public void test1()
	{
		String[] data = {"I","advocates","the","power","of","the","city","."};
		seperator.setdata(data);
		seperator.seperate();
		awl = seperator.getAWL();
		int result = awl.getStringArray().length;
		assertEquals(result,1);
	}

	@Test
	public void test2()
	{
		String[] data = {"I","am","advocating","the","power","of","the","city","."};
		seperator.setdata(data);
		seperator.seperate();
		awl = seperator.getAWL();
		int result = awl.getStringArray().length;
		assertEquals(result,0);
	}
	
	@Test
	public void test3()
	{
		String[] data = {"I","advocate","the","power","of","the","city","concurrently","."};
		seperator.setdata(data);
		seperator.seperate();
		awl = seperator.getAWL();
		int result = awl.getStringArray().length;
		assertEquals(result,2);
	}
	
	@Test
	public void test4()
	{
		String[] data = {"I","am","advocating","the","power","of","the","city","currently","."};
		seperator.setdata(data);
		seperator.seperate();
		awl = seperator.getAWL();
		int result = awl.getStringArray().length;
		assertEquals(result,0);
	}
	
	@Test
	public void test5()
	{
		String[] data = {"I","advocateded","the","power","of","the","city","currently","."};
		seperator.setdata(data);
		seperator.seperate();
		awl = seperator.getAWL();
		int result = awl.getStringArray().length;
		assertEquals(result,0);
	}
	@Test
	public void test6()
	{
		String[] data = {"I","advocated","the","power","of","the","city","currently",".","He","advocates","the","unclear","power"};
		seperator.setdata(data);
		seperator.seperate();
		awl = seperator.getAWL();
		int result = awl.getStringArray().length;
		assertEquals(result,1);
	}
}
